<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>PowerVR SDK</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<table width="100%">
  <tr>
    <td width="33%">
      <p align="left">&nbsp;<a href="http://www.imgtec.com"><img border="0" src="IMGLogo.jpg" width="200" height="30"></a></p>
    </td>
    <td width="33%">
      <p align="center"><font color="#808080" face="Arial" size="2">PowerVR Software Development Kit</a></font></p>
    </td>
    <td width="34%">
      <p align="right"><a href="http://www.powervr.com"><img border="0" src="PVRlogo.jpg" width="200" height="27"></a></p>
    </td>
  </tr>
</table>
<hr>
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>Uniform.h</h1><a href="Uniform_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
00002 <span class="comment"></span>
00003 <span class="comment"> @File         Uniform.h</span>
00004 <span class="comment"></span>
00005 <span class="comment"> @Title        A class for holding information about shader uniforms as they are loaded.</span>
00006 <span class="comment"></span>
00007 <span class="comment"> @Version      </span>
00008 <span class="comment"></span>
00009 <span class="comment"> @Copyright    Copyright (C)  Imagination Technologies Limited.</span>
00010 <span class="comment"></span>
00011 <span class="comment"> @Platform     Independent - OGL/OGLES/OGLES2 Specific at the moment</span>
00012 <span class="comment"></span>
00013 <span class="comment"> @Description  A class for holding information about shader uniforms as they are</span>
00014 <span class="comment">               loaded.</span>
00015 <span class="comment"></span>
00016 <span class="comment">******************************************************************************/</span>
00017 
00018 <span class="preprocessor">#ifndef UNIFORM_H</span>
00019 <span class="preprocessor"></span><span class="preprocessor">#define UNIFORM_H</span>
00020 <span class="preprocessor"></span>
00021 <span class="preprocessor">#include "PVRTools.h"</span>
00022 <span class="preprocessor">#include "<a class="code" href="Semantics_8h.html">Semantics.h</a>"</span>
00023 
00024 <span class="keyword">namespace </span>pvrengine
00025 {
00026     <span class="comment">/*!***************************************************************************</span>
00027 <span class="comment">    * @Class Uniform</span>
00028 <span class="comment">    * @Brief    A class for holding information about shader uniforms.</span>
00029 <span class="comment">    * @Description  A class for holding information about shader uniforms.</span>
00030 <span class="comment">    *****************************************************************************/</span>
00031     <span class="keyword">class </span>Uniform
<a name="l00032"></a><a class="code" href="classpvrengine_1_1Uniform.html">00032</a>     {
00033     <span class="keyword">public</span>:
00034         <span class="comment">/*!****************************************************************************</span>
00035 <span class="comment">        @Function       Uniform</span>
00036 <span class="comment">        @Description    Blank constructor from PFX</span>
00037 <span class="comment">        ******************************************************************************/</span>
00038         <a class="code" href="classpvrengine_1_1Uniform.html#a0">Uniform</a>(){}
00039 
<a name="l00040"></a><a class="code" href="classpvrengine_1_1Uniform.html#a0">00040</a>         <span class="comment">/*!****************************************************************************</span>
00041 <span class="comment">        @Function       Uniform</span>
00042 <span class="comment">        @Input          sUniform - a PFX uniform struct</span>
00043 <span class="comment">        @Description    Constructor from PFX uniform</span>
00044 <span class="comment">        ******************************************************************************/</span>
00045         <a class="code" href="classpvrengine_1_1Uniform.html#a0">Uniform</a>(<span class="keyword">const</span> SPVRTPFXUniform sUniform):
00046         m_u32Location(sUniform.nLocation),
00047             m_eSemantic((<a class="code" href="namespacepvrengine.html#a99">EUniformSemantic</a>)sUniform.nSemantic),
<a name="l00048"></a><a class="code" href="classpvrengine_1_1Uniform.html#a1">00048</a>             m_u32Idx(sUniform.nIdx)
00049         {}
00050 
00051         <span class="comment">/*!****************************************************************************</span>
00052 <span class="comment">        @Function       getSemantic</span>
00053 <span class="comment">        @Return         the enum identifier of this uniform</span>
00054 <span class="comment">        @Description    Accessor for the enum identifier of this uniform</span>
00055 <span class="comment">        ******************************************************************************/</span>
00056         <a class="code" href="namespacepvrengine.html#a99">EUniformSemantic</a> <a class="code" href="classpvrengine_1_1Uniform.html#a2">getSemantic</a>()<span class="keyword"> const</span>{<span class="keywordflow">return</span> m_eSemantic;}
00057 
00058         <span class="comment">/*!****************************************************************************</span>
00059 <span class="comment">        @Function       getLocation</span>
<a name="l00060"></a><a class="code" href="classpvrengine_1_1Uniform.html#a2">00060</a> <span class="comment">        @Return         the shader location for this uniform</span>
00061 <span class="comment">        @Description    Accessor for the location for this uniform</span>
00062 <span class="comment">        ******************************************************************************/</span>
00063         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classpvrengine_1_1Uniform.html#a3">getLocation</a>()<span class="keyword"> const</span>{<span class="keywordflow">return</span> m_u32Location;}
00064 
00065         <span class="comment">/*!****************************************************************************</span>
00066 <span class="comment">        @Function       getIdx</span>
00067 <span class="comment">        @Return         the index of this uniform</span>
<a name="l00068"></a><a class="code" href="classpvrengine_1_1Uniform.html#a3">00068</a> <span class="comment">        @Description    Accessor for the index of this uniform</span>
00069 <span class="comment">        ******************************************************************************/</span>
00070         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classpvrengine_1_1Uniform.html#a4">getIdx</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_u32Idx;}
00071 
00072     <span class="keyword">private</span>:
00073         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>    m_u32Location;      
00074         <a class="code" href="namespacepvrengine.html#a99">EUniformSemantic</a>    m_eSemantic;    
00075         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>    m_u32Idx;           
00077     };
00078 }
00079 
00080 
00081 <span class="preprocessor">#endif // UNIFORM_H</span>
00082 <span class="preprocessor"></span>
00083 <span class="comment">/******************************************************************************</span>
00084 <span class="comment">End of file (Uniform.h)</span>
00085 <span class="comment">******************************************************************************/</span>
00086 
</pre></div><br>
<br>
<P align=left><FONT size=2><STRONG><A 
   href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> � 
   1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
<hr>
<address style="align: left;"><small><FONT color=f0f>
Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
</body>
</html>
